package edu.guet.server.service;

import edu.guet.server.mapper.CourseMapper;
import edu.guet.server.model.Course;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourseService {
    @Autowired
    CourseMapper courseMapper;

    public void addCourse(Course course) {
        courseMapper.addCourse(course);
    }

    public Course findCourseByTechId(Integer techId) {
        Course course=courseMapper.findCourseByTechId(techId);
        return course;
    }

    public Course getCourseByCourseId(Integer courseId) {
        return courseMapper.getCourseByCourseId(courseId);
//        return null;
    }

    public void updateCourse(Course course) {
        courseMapper.updateCourse(course);
    }
    //    public void addTechCourse(Integer userId, Integer courseId) {
//        courseMapper.addTechCourse(userId,courseId);
//    }
}
